<?php
/**
 * 
 * Short Description of the file
 * 
 * Long Description of the file (if any)...
 *
 * @author Nicola Wilkinson
 * 
 * @copyright 2007 Loughborough University
 * @license http://www.gnu.org/licenses/gpl.txt
 * @version 0.0.0.1
 * @since 2 Mar 2010
 * 
 */
 
 
 function logit($input) {
     $handle = fopen('__log.txt', "a");
     fwrite($handle, var_export($input, true) . "\n");
 }
 
$username = $_POST["username"];

$password =$_POST["password"];

$record_details = "///////////////////////////////////////////////////////////////////////" .
				  "//		Username: " . $username . "  Password: " . $password . "    //" .
				  "///////////////////////////////////////////////////////////////////////";

		
logit($record_details);

$result = true;


//write out the return data dependant on if the details are accepted
$output = "<loginsuccess>";

//if the query returned true, the output <loginsuccess>yes</loginsuccess> else output <loginsuccess>no</loginsuccess>

if(!$result)

{

$output .= "no";		

}else{

$output .= "yes";	

}

$output .= "</loginsuccess>";

//output all the XML

print ($output);
?>